package com.swh.user;
import com.swh.user.dao.Impl.BaseDaoImpl;
import com.swh.utils.JwtUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import com.swh.utils.IdUtil;


import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @Description
 * @author swh
 * @date 2021-01-15 17:27:10
*/
@EnableJpaRepositories(basePackages = {"com.swh.user"},repositoryBaseClass = BaseDaoImpl.class)
@SpringBootApplication(exclude = MongoAutoConfiguration.class)
@EnableEurekaClient
//@SpringBootApplication
public class UserApplication {

	public static void main(String[] args) {
		SpringApplication.run(UserApplication.class, args);
	}

	@Bean
	public IdUtil idUtil(){
		return new IdUtil();
	}

	@Bean
	public BCryptPasswordEncoder bCryptPasswordEncoder(){
		return new BCryptPasswordEncoder();
	}

	@Bean
	public JwtUtil jwtUtil(){
		return new JwtUtil();
	}


	
}
